﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Iudicium.Autenticacion;
using System.Text;

public partial class PrintMasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.Title = Iudicium.Configuracion.ConfiguracionIudicium.GetApplicationName();
        if (!IsPostBack)
        {
            bool isAuthenticate = Autenticacion.IsAuthenticate();

            UserLoggedLiteral.Text = Autenticacion.GetCurrentUserFullName();
            LoadCssAndScript();
        }
    }

    private void LoadCssAndScript()
    {
        StringBuilder resources = new StringBuilder();

        resources.Append("<script type=\"text/javascript\" src=\"");
        resources.Append(VirtualPathUtility.ToAbsolute("~/Script/jquery-1.4.3.min.js"));
        resources.Append("\"></script>");

        resources.Append("<script type=\"text/javascript\" src=\"");
        resources.Append(VirtualPathUtility.ToAbsolute("~/Script/jquery-ui-1.8.4.custom.min.js"));
        resources.Append("\"></script>");

        resources.Append("<link rel=\"shortcut icon\" href=\"");
        resources.Append(VirtualPathUtility.ToAbsolute("~/Images/favicon.ico"));
        resources.Append("\" />");
        ScriptLiteral.Text = resources.ToString();
    }
}
